This invention relates generally to color digital cameras, and more particularly to the processing of color data generated by the sensor of a color digital camera.
Digital color cameras are used with computer or other digital processing systems. Such cameras include a sensor array, optics, preprocessing electronics, and a cable or other communication link to transfer data to the digital processing system. Digital cameras are made by Connectix, Intel, and others.
Digital cameras of the prior art often include a solid state sensor including a mosaic of red (R), green (G) and blue (B) sensor elements. Data from the sensor is transmitted to a data processing apparatus to be processed into a series of digital images. However, since there are typically many thousands of sensor elements on a sensor, and since digital video requires frequent updates (xe2x80x9crefreshingxe2x80x9d) in the order of 20-30 times per second, it is not typically practical to provide a transmission medium that is fast enough to send all of the data available from the sensor to the data processing apparatus. In the past, this problem has been addressed by lossy compression techniques that discards a considerable portion of the video data available from the sensor.
Some of the prior art compression technologies provide an interpolation step which occurs before compression. The interpolation step provides collocated RGB values, and allows for luminance/chrominance re-mapping as well as color correction on the chip. While these other design approaches allow the use of standard and well-known technologies, they are very inefficient because they generate 24 bit data in the chip, which is then compressed and sent to the host.
The sensors used in digital cameras are often of the xe2x80x9cmosaicxe2x80x9d sensor type, where red (R), green (G), and blue (B) pixels are arranged in a matrix. With mosaic type video sensors, groups of pixels are assembled into blocks for processing through conventional compression techniques. This compression is desirable due to the typically limited bandwidth of the connection mechanism between the camera and the digital processing system. A common form of compression utilizes a discrete cosine transform (DCT).
An advantage of using a mosaic type sensor is that it has only one color value per pixel, which allows for rapid compression of the color sensor data. Of the mosaic type video sensors, the xe2x80x9cBayer-2Gxe2x80x9d mosaic sensor interesting in that it gives twice as many green pixels as red or blue pixels. Green pixels are good for detecting luminance (brightness) values. However, the Bayer-2G mosaic also makes it more difficult to preprocess the color data. That is, the Bayer-2G sensor places the green pixels in a crosshatched pattern, as seen in prior art FIG. 1, which makes the assembly of blocks for compression relatively difficult.
The present invention manipulates incoming sensor data through a number of filters, while taking the geometry of the sensor into account. These include gamma correction, a demultiplexer, a buffered scheme for creating monochromatic 8xc3x978 blocks, a discrete cosine transform, run length encoding, and Huffman coding. The resulting Huffman codes are transmitted to the host via USB interface logic.
As noted previously, while prior art design approaches allow the use of more standard technologies, they are very inefficient because they generate 24 bit data in the chip, which is then compressed and sent to the host. The present invention achieves a three-fold reduction in the data rate because the data remains 8 bits per pixel instead of 24 bits per pixel. Furthermore, any future improvements in compression technology will benefit from the architecture of the present invention in that the compression ratio gains will be multiplied by a factor of three because interpolation is done on the host, and the compression works directly on the raw sensor data.
The present invention uses xe2x80x9cdiagonalxe2x80x9d preprocessing to assembly green pixel data derived from a Bayer-2G mosaic sensor into blocks that are suitable for discrete cosine transformation (DCT) compression. This preprocessing provides for excellent data compression with superior image quality.
The diagonal preprocessing is accomplished by identifying a diamond shaped block and rotating the block by 45 degrees. The block is then processed through DCT as a normal compression block, and then is rotated back on the host (i.e. in the digital processing system) side. The leftover xe2x80x9cedgesxe2x80x9d surrounding the diamond shaped block are formed into their own compression block, which is reassembled with the diamond shaped block after DCT compression and decompression. As a result, the DCT blocks can be processed such that the pixels that are closest together are processed together. This results in a sharper image and, in addition, better compression due to a minimization of the variance of the DCT cosine wave. Still further, the process of the present invention spreads the data content over time, reducing data xe2x80x9cburstsxe2x80x9d which could exceed the data handling capacity of the data bus or of the host digital processing system.
An advantage of the present invention is that it provides a compression technology for the transmission of video sensor data from, for example, a digital camera, that is very efficient in terms of gate count, sensor cost, compression ratio, and image quality.
Another advantage of the present invention over the prior art is that it takes the geometry of the sensor into account. This allows the design to be much more efficient than was heretofore possible.
These and other advantages of the present invention will become apparent to those skilled in the art upon a reading of the following descriptions of the invention and a study of the several figures of the drawing.